
--CREATE TABLE [provinceCity](
--	[Province] [nvarchar](50) NOT NULL,
--	[City] [nvarchar](50) NOT NULL
--) ON [PRIMARY]


--select * from provinceCity


--INSERT INTO [LLFMCAT].[dbo].[tbl_Province]
--           ([ProvinceName]
--           ,[ShortName])
--           select province,province 
--           from provinceCity group by Province   
        

--select * from tbl_Province


--truncate table tbl_City 


--Declare @n int
--Declare @provinceCount int 
--set  @provinceCount =35
--set @n=1
--while @n<36
--begin
-- INSERT INTO [LLFMCAT].[dbo].[tbl_City]
--           ([CityName]
--           ,[ProvinceId])
--			select city,@n from 
--			provinceCity where Province = (
--			select ProvinceName from tbl_Province 
--			where Id = @n)
--	set @n = @n +1
--End


--select p.ProvinceName,c.CityName
--from tbl_Province p 
--inner join tbl_city c
--on p.Id = c.provinceId









